package com.kun.alldb.support;

import com.kun.alldb.base.DatasourceBase;
import com.kun.alldb.wrapper.ConstantWrapper;
import com.kun.db.Entity;
import com.kun.db.sql.Wrapper;

/**
 * 数据库操作管理对象
 *
 * @author kun.li
 */
public abstract class DBManager {

    protected DatasourceBase datasourceBase;

    protected ConstantWrapper constantWrapper = new ConstantWrapper();


    public DBManager(DatasourceBase datasourceBase) {
        this.datasourceBase = datasourceBase;
    }

    /**
     * 校验连接
     *
     * @return
     */
    public abstract boolean checkDataSource();

    /**
     * 统计数据量
     *
     * @param entity
     * @return
     */
    public abstract long count(Entity entity);
}
